import pytest

from tools.handle_assert_db import HandleAssertDB
from tools.handle_extract import HandleExtract
from tools.handle_faker import HandleFaker
from tools.handle_replace import HandleReplace
from tools.handle_request import HandleRequests
from tools.handle_loguru import logger
from tools.handle_assert_response import HandleAssertResponse


@pytest.fixture(scope='class')
def init():
    handle_replace = HandleReplace()
    handle_faker = HandleFaker()
    handle_requests = HandleRequests()
    handle_assert_response = HandleAssertResponse()
    handle_extract = HandleExtract()
    handle_assert_db = HandleAssertDB()
    logger.info("========= 执行前置夹具（init），初始化：HandleReplace类、HandleFaker类、"
                "HandleRequests类、HandleAssertResponse类、HandleExtract类、HandleAssertDB类。 =========")
    yield (handle_replace,
           handle_faker,
           handle_requests,
           handle_assert_response,
           handle_extract,
           handle_assert_db
           )
